package com.example.myapplication10.DTO;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.List;

public class DataDTO {
    @JSONField(name = "shidu")
    private String shidu;
    @JSONField(name = "pm25")
    private Integer pm25;
    @JSONField(name = "pm10")
    private Integer pm10;
    @JSONField(name = "quality")
    private String quality;
    @JSONField(name = "wendu")
    private String wendu;
    @JSONField(name = "ganmao")
    private String ganmao;
    @JSONField(name = "forecast")
    private List<ForecastDTO> forecast;
    @JSONField(name = "yesterday")
    private YesterdayDTO yesterday;

//    public void strInitialize(String strData){
//        JSONObject object = JSONObject.parseObject(strData);
//        JSONArray array = object.getJSONArray("forecast");
//        forecast = array.toJavaList(ForecastDTO.class);
//        JSONObject yesterdayObj = object.getJSONObject("yesterday");
//        yesterday = yesterdayObj.toJavaObject(YesterdayDTO.class);
//    }

    public String getShidu() {
        return shidu;
    }

    public void setShidu(String shidu) {
        this.shidu = shidu;
    }

    public Integer getPm25() {
        return pm25;
    }

    public void setPm25(Integer pm25) {
        this.pm25 = pm25;
    }

    public Integer getPm10() {
        return pm10;
    }

    public void setPm10(Integer pm10) {
        this.pm10 = pm10;
    }

    public String getQuality() {
        return quality;
    }

    public void setQuality(String quality) {
        this.quality = quality;
    }

    public String getWendu() {
        return wendu;
    }

    public void setWendu(String wendu) {
        this.wendu = wendu;
    }

    public String getGanmao() {
        return ganmao;
    }

    public void setGanmao(String ganmao) {
        this.ganmao = ganmao;
    }

    public List<ForecastDTO> getForecast() {
        return forecast;
    }

    public void setForecast(List<ForecastDTO> forecast) {
        this.forecast = forecast;
    }

    public YesterdayDTO getYesterday() {
        return yesterday;
    }

    public void setYesterday(YesterdayDTO yesterday) {
        this.yesterday = yesterday;
    }
}
